// 该文件负责所有的公共的组件的全局注册   Vue.use
import PageTools from './PageTools'
import UploadExccel from './UploadExcel'
import ImageUpload from './ImageUpload'
import lang from './lang'
import TagsView from './TagsView'
export default {
  install(Vue) {
    //  注册全局的通用栏组件对象
    Vue.component('PageTools', PageTools)
    Vue.component('UploadExccel', UploadExccel)
    Vue.component('ImageUpload', ImageUpload)
    Vue.component('lang', lang)
    Vue.component('TagsView', TagsView)

    Vue.prototype.$sleep = function(timer = 500) {
      return new Promise(resolve => {
        setTimeout(() => {
          resolve()
        }, timer)
      })
    }
  }
}
